using HCore.Unity.Behaviour;
using UnityEngine;

namespace HCore.Tests.Runtime.BlurEffect.Scripts
{
    public enum UILayer
    {
        UI = 1,
        Top = 2
    }

    public class PanelMgr : SmartSingletonMonoBehaviour<PanelMgr>
    {
        private static PanelMgr _INSTANCE;

        private Transform mTop;
        private Transform mUI;

        protected override void Awake()
        {
            mUI = GameObject.Find("Canvas/UI").transform;
            mTop = GameObject.Find("Canvas/Top").transform;
            base.Awake();
        }

        public Transform GetBaseViewParentNode(UILayer uiLayer)
        {
            return uiLayer switch
            {
                UILayer.UI => mUI,
                UILayer.Top => mTop,
                // 默认返回UI层
                _ => mUI
            };
        }
    }
}